﻿package plugin.map
{
    import com.core.*;

    public class MapControl extends Control
    {

        public function MapControl(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "map")
            {
            }
            if (param1.getName() == "minimap")
            {
                if (param2.property == "updateMap")
                {
                    this.target.updateMap(param2.newvalue);
                }
                else if (param2.property == "clear")
                {
                    this.target.removeAllActor();
                }
                else if (param2.property == "findPath")
                {
                    this.target.findPath(param2.newvalue);
                }
                else if (param2.property == "clearPath")
                {
                    this.target.clearPath();
                }
                else if (param2.property == "showearth")
                {
                    this.target.ShowEarth();
                }
                else if (param2.property == "reshowgps")
                {
                    this.target.showMap(param2.newvalue);
                }
                else if (param2.property == "showpass")
                {
                    this.target.woldPanel.showItem(param2.newvalue);
                }
                else if (param2.property == "goto")
                {
                    this.target.sclickHandler(param2.newvalue);
                }
                else if (param2.property == "autoMove")
                {
                    this.target.autoMove(param2.newvalue);
                }
                else if (param2.property == "pretime")
                {
                    this.target.pretime = 0;
                }
            }
            return;
        }// end function

    }
}
